package com.smart.support.controller;

import com.smart.common.entities.ajax.AjaxResult;
import com.smart.common.entities.constant.SmartConstant;
import com.smart.common.entities.option.SelectOption;
import com.smart.manager.pop.repository.PopLinkRepository;
import com.smart.manager.union.mall.repository.UnionMallKindRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Xiaxuqiu
 * @date 2023-04-01
 **/
@Api(tags = "活动中心")
@RestController
@Log4j2
@RequestMapping(SmartConstant.MANAGER_API_PREFIX + "union/support")
@RequiredArgsConstructor
public class UnionApi {

    private final UnionMallKindRepository unionMallKindRepository;

    @ApiOperation(value = "获取商品分类字典")
    @GetMapping("mallKindOptions")
    public AjaxResult<List<SelectOption>> getMallKindOptions() {
        List<SelectOption> result = unionMallKindRepository.getOptions();
        return AjaxResult.data(result);
    }









}
